#ifndef __LIB_GUI_CONTAINER_H
#define __LIB_GUI_CONTAINER_H

#include <sys/list.h>

typedef struct gui_spirit gui_spirit_t;

typedef struct
{
    list_t children_list; // children container
    gui_spirit_t *spirit; // spirit object
} gui_container_t;

#define GUI_CONTAINER(spirit) ((gui_container_t *)((spirit)->container))

gui_container_t *gui_container_create(gui_spirit_t *spirit);
int gui_container_destroy(gui_container_t *container);
int gui_container_add(gui_container_t *container, gui_spirit_t *spirit);
int gui_container_remove(gui_container_t *container, gui_spirit_t *spirit);
int gui_container_remove_destroy_all(gui_container_t *container);

#endif